class Square{
    getarea() {
        this.area = this.length + this.length;
        return this.area
    }
    setlength( value) {
        this.length = value;
    }
}

let s = new Square();
s.setlength(6);
console.log(s.getarea());